Page({
    data:{
        title:"一半",
        time:"2015-10-19",
        singer:"薛之谦",
        url:"http://p2.music.126.net/h-qQKtPVMxIfdCI8jPYs0w==/109951168707346683.jpg?param=177y177",
        list:[
            {
                id:35528482,
                videoSrc:"http://link.hhtjim.com/163/35528482.mp3",
                songname:"一半",
                name:"薛之谦",
            },
            {
                id:35288183,
                videoSrc:"http://link.hhtjim.com/163/35288183.mp3",
                songname:"小孩",
                name:"薛之谦",
            },
            {
                id:35528483,
                videoSrc:"http://link.hhtjim.com/163/35528483.mp3",
                songname:"Stay Here",
                name:"薛之谦",
            },
           
        ]
    },
    tomusic(event) {
        const item = event.currentTarget.dataset.item; // 获取当前点击的数据项
        const { id, videoSrc,songname,name } = item; // 从数据项中解构出
        const { list,url }=this.data
        wx.navigateTo({
            url: `/pages/music/music?id=${id}&videoSrc=${encodeURIComponent(videoSrc)}&songname=${songname}&name=${name}&url=${encodeURIComponent(url)}&list=${encodeURIComponent(JSON.stringify(list))}`,
          });
    }
})